reactive: true,
track_hover: true,
can_focus: true,
- accessible_name: _("Choose Session"),
+ accessible_name: _('Choose Session'),
accessible_role: Atk.Role.MENU,
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER,
// login screen. It can be activated to reveal an entry for
// manually entering the username.
let notListedLabel = new St.Label({
- text: _("Not listed?"),
+ text: _('Not listed?'),
style_class: 'login-dialog-not-listed-label',
});
this._notListedButton = new St.Button({
// Translators: this message is shown below the username entry field
// to clue the user in on how to login to the local network realm
- this._authPrompt.setMessage(_("(e.g., user or %s)").format(hint), GdmUtil.MessageType.HINT);
+ this._authPrompt.setMessage(_('(e.g., user or %s)').format(hint), GdmUtil.MessageType.HINT);
}
_askForUsernameAndBeginVerification() {
open() {
Main.ctrlAltTabManager.addGroup(this,
- _("Login Window"),
+ _('Login Window'),
'dialog-password-symbolic',
{ sortGroup: CtrlAltTab.SortGroup.MIDDLE });
this.activate();
import {loadInterfaceXML} from '../misc/fileUtils.js';
-const ProviderIface = loadInterfaceXML("org.freedesktop.realmd.Provider");
+const ProviderIface = loadInterfaceXML('org.freedesktop.realmd.Provider');
const Provider = Gio.DBusProxy.makeProxyWrapper(ProviderIface);
-const ServiceIface = loadInterfaceXML("org.freedesktop.realmd.Service");
+const ServiceIface = loadInterfaceXML('org.freedesktop.realmd.Service');
const Service = Gio.DBusProxy.makeProxyWrapper(ServiceIface);
-const RealmIface = loadInterfaceXML("org.freedesktop.realmd.Realm");
+const RealmIface = loadInterfaceXML('org.freedesktop.realmd.Realm');
const Realm = Gio.DBusProxy.makeProxyWrapper(RealmIface);
export class Manager extends Signals.EventEmitter {
this._defaultService = FINGERPRINT_SERVICE_NAME;
if (!this._defaultService) {
- log("no authentication service is enabled, using password authentication");
+ log('no authentication service is enabled, using password authentication');
this._defaultService = PASSWORD_SERVICE_NAME;
}
}
_syncRunningApplications() {
let tracker = Shell.WindowTracker.get_default();
let apps = this._appSystem.get_running();
- let seatName = "seat0";
+ let seatName = 'seat0';
let newRunningApplications = {};
let newActiveApplication = null;
const SystemdLoginUser = Gio.DBusProxy.makeProxyWrapper(SystemdLoginUserIface);
function haveSystemd() {
- return GLib.access("/run/systemd/seats", 0) >= 0;
+ return GLib.access('/run/systemd/seats', 0) >= 0;
}
function versionCompare(required, reference) {
}
export async function registerSessionWithGDM() {
- log("Registering session with GDM");
+ log('Registering session with GDM');
try {
await Gio.DBus.system.call(
'org.gnome.DisplayManager',
}
_reloadOperatorName() {
- let newName = "";
+ let newName = '';
if (this.operator_name_3gpp && this.operator_name_3gpp.length > 0)
newName += this.operator_name_3gpp;
if (this.operator_name_cdma && this.operator_name_cdma.length > 0) {
- if (newName != "")
- newName += ", ";
+ if (newName != '')
+ newName += ', ';
newName += this.operator_name_cdma;
}
this._actions = new Map();
this._actions.set(POWER_OFF_ACTION_ID, {
// Translators: The name of the power-off action in search
- name: C_("search-result", "Power Off"),
+ name: C_('search-result', 'Power Off'),
iconName: 'system-shutdown-symbolic',
// Translators: A list of keywords that match the power-off action, separated by semicolons
keywords: tokenizeKeywords(_('power off;poweroff;shutdown;halt;stop')),
});
this._actions.set(LOCK_SCREEN_ACTION_ID, {
// Translators: The name of the lock screen action in search
- name: C_("search-result", "Lock Screen"),
+ name: C_('search-result', 'Lock Screen'),
iconName: 'system-lock-screen-symbolic',
// Translators: A list of keywords that match the lock screen action, separated by semicolons
keywords: tokenizeKeywords(_('lock screen')),
});
this._actions.set(LOGOUT_ACTION_ID, {
// Translators: The name of the logout action in search
- name: C_("search-result", "Log Out"),
+ name: C_('search-result', 'Log Out'),
iconName: 'system-log-out-symbolic',
// Translators: A list of keywords that match the logout action, separated by semicolons
keywords: tokenizeKeywords(_('logout;log out;sign off')),
});
this._actions.set(SUSPEND_ACTION_ID, {
// Translators: The name of the suspend action in search
- name: C_("search-result", "Suspend"),
+ name: C_('search-result', 'Suspend'),
iconName: 'media-playback-pause-symbolic',
// Translators: A list of keywords that match the suspend action, separated by semicolons
keywords: tokenizeKeywords(_('suspend;sleep')),
});
this._actions.set(SWITCH_USER_ACTION_ID, {
// Translators: The name of the switch user action in search
- name: C_("search-result", "Switch User"),
+ name: C_('search-result', 'Switch User'),
iconName: 'system-switch-user-symbolic',
// Translators: A list of keywords that match the switch user action, separated by semicolons
keywords: tokenizeKeywords(_('switch user')),
}
function _handleSpawnError(command, err) {
- let title = _("Execution of “%s” failed:").format(command);
+ let title = _('Execution of “%s” failed:').format(command);
Main.notifyError(title, err.message);
}
let appItems = apps.map(id => this._items.get(id).app);
let folderName = _findBestFolderName(appItems);
if (!folderName)
- folderName = _("Unnamed Folder");
+ folderName = _('Unnamed Folder');
newFolderSettings.delay();
newFolderSettings.set_string('name', folderName);
_getDeviceLabel(device) {
switch (device) {
case AudioDevice.HEADPHONES:
- return _("Headphones");
+ return _('Headphones');
case AudioDevice.HEADSET:
- return _("Headset");
+ return _('Headset');
case AudioDevice.MICROPHONE:
- return _("Microphone");
+ return _('Microphone');
default:
return null;
}
constructor(layoutManager) {
super(layoutManager.dummyCursor, 0, St.Side.TOP);
- this.addSettingsAction(_("Change Background…"), 'gnome-background-panel.desktop');
+ this.addSettingsAction(_('Change Background…'), 'gnome-background-panel.desktop');
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
- this.addSettingsAction(_("Display Settings"), 'gnome-display-panel.desktop');
+ this.addSettingsAction(_('Display Settings'), 'gnome-display-panel.desktop');
this.addSettingsAction(_('Settings'), 'org.gnome.Settings.desktop');
this.actor.add_style_class_name('background-menu');
}
_valueChanged() {
- this._customAccessible.notify("accessible-value");
+ this._customAccessible.notify('accessible-value');
}
});
function _isWorkDay(date) {
/* Translators: Enter 0-6 (Sunday-Saturday) for non-work days. Examples: "0" (Sunday) "6" (Saturday) "06" (Sunday and Saturday). */
- let days = C_('calendar-no-work', "06");
+ let days = C_('calendar-no-work', '06');
return !days.includes(date.getDay().toString());
}
* NOTE: These grid abbreviations are always shown together
* and in order, e.g. "S M T W T F S".
*/
- NC_("grid sunday", "S"),
+ NC_('grid sunday', 'S'),
/* Translators: Calendar grid abbreviation for Monday */
- NC_("grid monday", "M"),
+ NC_('grid monday', 'M'),
/* Translators: Calendar grid abbreviation for Tuesday */
- NC_("grid tuesday", "T"),
+ NC_('grid tuesday', 'T'),
/* Translators: Calendar grid abbreviation for Wednesday */
- NC_("grid wednesday", "W"),
+ NC_('grid wednesday', 'W'),
/* Translators: Calendar grid abbreviation for Thursday */
- NC_("grid thursday", "T"),
+ NC_('grid thursday', 'T'),
/* Translators: Calendar grid abbreviation for Friday */
- NC_("grid friday", "F"),
+ NC_('grid friday', 'F'),
/* Translators: Calendar grid abbreviation for Saturday */
- NC_("grid saturday", "S"),
+ NC_('grid saturday', 'S'),
];
return Shell.util_translate_time_string(abbreviations[dayNumber]);
}
style_class: 'calendar-week-number',
can_focus: true,
});
- let weekFormat = Shell.util_translate_time_string(N_("Week %V"));
+ let weekFormat = Shell.util_translate_time_string(N_('Week %V'));
label.clutter_text.y_align = Clutter.ActorAlign.CENTER;
label.accessible_name = formatDateWithCFormatString(iter, weekFormat);
layout.attach(label, rtl ? 7 : 0, row, 1, 1);
let windowApp = tracker.get_window_app(this._window);
/* Translators: %s is an application name */
- let title = _("“%s” is not responding.").format(windowApp.get_name());
+ let title = _('“%s” is not responding.').format(windowApp.get_name());
let description = _('You may choose to wait a short while for it to ' +
'continue or force the app to quit entirely.');
return new Dialog.MessageDialogContent({ title, description });
let surfaceActor = windowActor.get_first_child();
let effect = new Clutter.BrightnessContrastEffect();
effect.set_brightness(FROZEN_WINDOW_BRIGHTNESS);
- surfaceActor.add_effect_with_name("gnome-shell-frozen-window", effect);
+ surfaceActor.add_effect_with_name('gnome-shell-frozen-window', effect);
}
_removeWindowEffect() {
let windowActor = this._window.get_compositor_private();
let surfaceActor = windowActor.get_first_child();
- surfaceActor.remove_effect_by_name("gnome-shell-frozen-window");
+ surfaceActor.remove_effect_by_name('gnome-shell-frozen-window');
}
_onWait() {
let player = global.display.get_sound_player();
player.play_from_theme('device-added-media',
- _("External drive connected"),
+ _('External drive connected'),
null);
}
let player = global.display.get_sound_player();
player.play_from_theme('device-removed-media',
- _("External drive disconnected"),
+ _('External drive disconnected'),
null);
}
this._reaskPassword(volume);
} else {
if (e.message.includes('Compiled against a version of libcryptsetup that does not support the VeraCrypt PIM setting')) {
- Main.notifyError(_("Unable to unlock volume"),
- _("The installed udisks version does not support the PIM setting"));
+ Main.notifyError(_('Unable to unlock volume'),
+ _('The installed udisks version does not support the PIM setting'));
}
if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED_HANDLED))
if (volume == null)
return true;
- return volume.get_identifier("class") == "network";
+ return volume.get_identifier('class') == 'network';
}
function startAppForMount(app, mount) {
let label = new St.Bin({
child: new St.Label({
- text: _("Open with %s").format(app.get_name()),
+ text: _('Open with %s').format(app.get_name()),
y_align: Clutter.ActorAlign.CENTER,
}),
});
this.contentLayout.add_child(contentBox);
this._okButton = {
- label: _("Connect"),
+ label: _('Connect'),
action: this._onOk.bind(this),
default: true,
};
this.setButtons([{
- label: _("Cancel"),
+ label: _('Cancel'),
action: this.cancel.bind(this),
key: Clutter.KEY_Escape,
}, this._okButton]);
let ieee8021xSetting = this._connection.get_setting_802_1x();
/* If hints were given we know exactly what we need to ask */
- if (this._settingName == "802-1x" && this._hints.length) {
+ if (this._settingName == '802-1x' && this._hints.length) {
if (this._hints.includes('identity')) {
secrets.push({
label: _('Username'),
wirelessSetting = this._connection.get_setting_wireless();
ssid = NM.utils_ssid_to_utf8(wirelessSetting.get_ssid().get_data());
content.title = _('Authentication required');
- content.message = _("Passwords or encryption keys are required to access the wireless network “%s”.").format(ssid);
+ content.message = _('Passwords or encryption keys are required to access the wireless network “%s”.').format(ssid);
this._getWirelessSecrets(content.secrets, wirelessSetting);
break;
case '802-3-ethernet':
- content.title = _("Wired 802.1X authentication");
+ content.title = _('Wired 802.1X authentication');
content.message = null;
content.secrets.push({
label: _('Network name'),
this._get8021xSecrets(content.secrets);
break;
case 'pppoe':
- content.title = _("DSL authentication");
+ content.title = _('DSL authentication');
content.message = null;
this._getPPPoESecrets(content.secrets);
break;
case 'gsm':
if (this._hints.includes('pin')) {
let gsmSetting = this._connection.get_setting_gsm();
- content.title = _("PIN code required");
- content.message = _("PIN code is needed for the mobile broadband device");
+ content.title = _('PIN code required');
+ content.message = _('PIN code is needed for the mobile broadband device');
content.secrets.push({
label: _('PIN'),
key: 'pin',
case 'cdma':
case 'bluetooth':
content.title = _('Authentication required');
- content.message = _("A password is required to connect to “%s”.").format(connectionSetting.get_id());
+ content.message = _('A password is required to connect to “%s”.').format(connectionSetting.get_id());
this._getMobileSecrets(content.secrets, connectionType);
break;
default:
}
_showNotification(requestId, connection, settingName, hints, flags) {
- let source = new MessageTray.Source(_("Network Manager"), 'network-transmit-receive');
+ let source = new MessageTray.Source(_('Network Manager'), 'network-transmit-receive');
source.policy = new MessageTray.NotificationApplicationPolicy('gnome-network-panel');
let title, body;
let wirelessSetting = connection.get_setting_wireless();
let ssid = NM.utils_ssid_to_utf8(wirelessSetting.get_ssid().get_data());
title = _('Authentication required');
- body = _("Passwords or encryption keys are required to access the wireless network “%s”.").format(ssid);
+ body = _('Passwords or encryption keys are required to access the wireless network “%s”.').format(ssid);
break;
}
case '802-3-ethernet':
- title = _("Wired 802.1X authentication");
+ title = _('Wired 802.1X authentication');
body = _('A password is required to connect to “%s”.').format(connection.get_id());
break;
case 'pppoe':
- title = _("DSL authentication");
+ title = _('DSL authentication');
body = _('A password is required to connect to “%s”.').format(connection.get_id());
break;
case 'gsm':
if (hints.includes('pin')) {
- title = _("PIN code required");
- body = _("PIN code is needed for the mobile broadband device");
+ title = _('PIN code required');
+ body = _('PIN code is needed for the mobile broadband device');
break;
}
// fall through
case 'cdma':
case 'bluetooth':
title = _('Authentication required');
- body = _("A password is required to connect to “%s”.").format(connectionSetting.get_id());
+ body = _('A password is required to connect to “%s”.').format(connectionSetting.get_id());
break;
case 'vpn':
- title = _("VPN password");
- body = _("A password is required to connect to “%s”.").format(connectionSetting.get_id());
+ title = _('VPN password');
+ body = _('A password is required to connect to “%s”.').format(connectionSetting.get_id());
break;
default:
log(`Invalid connection type: ${connectionType}`);
this.connect('closed', this._onDialogClosed.bind(this));
- let title = _("Authentication Required");
+ let title = _('Authentication Required');
let headerContent = new Dialog.MessageDialogContent({ title, description });
this.contentLayout.add_child(headerContent);
this._passwordEntry = new St.PasswordEntry({
style_class: 'prompt-dialog-password-entry',
- text: "",
+ text: '',
can_focus: true,
visible: false,
x_align: Clutter.ActorAlign.CENTER,
* requested authentication was not gained; this can happen
* because of an authentication error (like invalid password),
* for instance. */
- this._errorMessageLabel.set_text(_("Sorry, that didn’t work. Please try again."));
+ this._errorMessageLabel.set_text(_('Sorry, that didn’t work. Please try again.'));
this._errorMessageLabel.show();
this._infoMessageLabel.hide();
this._nullMessageLabel.hide();
x_align: Clutter.ActorAlign.CENTER,
});
- this._labelText = "";
+ this._labelText = '';
this.label = new St.Label({ style_class: 'dash-label' });
this.label.hide();
Main.layoutManager.addChrome(this.label);
// Translators: this is the name of the dock/favorites area on
// the left of the overview
- Main.ctrlAltTabManager.addGroup(this, _("Dash"), 'user-bookmarks-symbolic');
+ Main.ctrlAltTabManager.addGroup(this, _('Dash'), 'user-bookmarks-symbolic');
}
_onItemDragBegin() {
this._dragActor, targX, targY, event.get_time());
} catch (e) {
// On error, skip this target
- logError(e, "Skipping drag target");
+ logError(e, 'Skipping drag target');
}
if (accepted) {
// If it accepted the drop without taking the actor,
const EndSessionDialogIface = loadInterfaceXML('org.gnome.SessionManager.EndSessionDialog');
const logoutDialogContent = {
- subjectWithUser: C_("title", "Log Out %s"),
- subject: C_("title", "Log Out"),
+ subjectWithUser: C_('title', 'Log Out %s'),
+ subject: C_('title', 'Log Out'),
descriptionWithUser(user, seconds) {
return ngettext(
'%s will be logged out automatically in %d second.',
};
const shutdownDialogContent = {
- subject: C_("title", "Power Off"),
- subjectWithUpdates: C_("title", "Install Updates & Power Off"),
+ subject: C_('title', 'Power Off'),
+ subjectWithUpdates: C_('title', 'Install Updates & Power Off'),
description(seconds) {
return ngettext(
'The system will power off automatically in %d second.',
'The system will power off automatically in %d seconds.',
seconds).format(seconds);
},
- checkBoxText: C_("checkbox", "Install pending software updates"),
+ checkBoxText: C_('checkbox', 'Install pending software updates'),
showBatteryWarning: true,
confirmButtons: [{
signal: 'ConfirmedShutdown',
};
const restartDialogContent = {
- subject: C_("title", "Restart"),
+ subject: C_('title', 'Restart'),
subjectWithUpdates: C_('title', 'Install Updates & Restart'),
description(seconds) {
return ngettext(
const restartUpdateDialogContent = {
- subject: C_("title", "Restart & Install Updates"),
+ subject: C_('title', 'Restart & Install Updates'),
description(seconds) {
return ngettext(
'The system will automatically restart and install updates in %d second.',
signal: 'ConfirmedReboot',
label: C_('button', 'Restart & Install'),
}],
- unusedFutureButtonForTranslation: C_("button", "Install & Power Off"),
- unusedFutureCheckBoxForTranslation: C_("checkbox", "Power off after updates are installed"),
+ unusedFutureButtonForTranslation: C_('button', 'Install & Power Off'),
+ unusedFutureCheckBoxForTranslation: C_('checkbox', 'Power off after updates are installed'),
iconName: 'view-refresh-symbolic',
showOtherSessions: true,
};
const restartUpgradeDialogContent = {
- subject: C_("title", "Restart & Install Upgrade"),
+ subject: C_('title', 'Restart & Install Upgrade'),
upgradeDescription(distroName, distroVersion) {
/* Translators: This is the text displayed for system upgrades in the
shut down dialog. First %s gets replaced with the distro name and
second %s with the distro version to upgrade to */
- return _("%s %s will be installed after restart. Upgrade installation can take a long time: ensure that you have backed up and that the computer is plugged in.").format(distroName, distroVersion);
+ return _('%s %s will be installed after restart. Upgrade installation can take a long time: ensure that you have backed up and that the computer is plugged in.').format(distroName, distroVersion);
},
disableTimer: true,
showBatteryWarning: false,
if (!(this._type in DialogContent)) {
invocation.return_dbus_error('org.gnome.Shell.ModalDialog.TypeError',
- "Unknown dialog type requested");
+ 'Unknown dialog type requested');
return;
}
if (!this.open(timestamp)) {
invocation.return_dbus_error('org.gnome.Shell.ModalDialog.GrabError',
- "Cannot grab pointer and keyboard");
+ 'Cannot grab pointer and keyboard');
return;
}
let extension = this.lookup(uuid);
if (!extension)
- throw new Error("Extension was not properly created. Call createExtensionObject first");
+ throw new Error('Extension was not properly created. Call createExtensionObject first');
let dir = extension.dir;
let extensionJs = dir.get_child('extension.js');
key = KEY_SLOW_KEYS_ENABLED;
enabled = (newFlags & Meta.KeyboardA11yFlags.SLOW_KEYS_ENABLED) > 0;
title = enabled
- ? _("Slow Keys Turned On")
- : _("Slow Keys Turned Off");
+ ? _('Slow Keys Turned On')
+ : _('Slow Keys Turned Off');
description = _('You just held down the Shift key for 8 seconds. This is the shortcut ' +
'for the Slow Keys feature, which affects the way your keyboard works.');
} else if (whatChanged & Meta.KeyboardA11yFlags.STICKY_KEYS_ENABLED) {
key = KEY_STICKY_KEYS_ENABLED;
enabled = (newFlags & Meta.KeyboardA11yFlags.STICKY_KEYS_ENABLED) > 0;
title = enabled
- ? _("Sticky Keys Turned On")
- : _("Sticky Keys Turned Off");
+ ? _('Sticky Keys Turned On')
+ : _('Sticky Keys Turned Off');
description = enabled
- ? _("You just pressed the Shift key 5 times in a row. This is the shortcut " +
- "for the Sticky Keys feature, which affects the way your keyboard works.")
- : _("You just pressed two keys at once, or pressed the Shift key 5 times in a row. " +
- "This turns off the Sticky Keys feature, which affects the way your keyboard works.");
+ ? _('You just pressed the Shift key 5 times in a row. This is the shortcut ' +
+ 'for the Sticky Keys feature, which affects the way your keyboard works.')
+ : _('You just pressed two keys at once, or pressed the Shift key 5 times in a row. ' +
+ 'This turns off the Sticky Keys feature, which affects the way your keyboard works.');
} else {
return;
}
errorDisplay.add(new St.Label({ text: errors[i] }));
} else {
/* Translators: argument is an extension UUID. */
- let message = _("%s has not emitted any errors.").format(extension.uuid);
+ let message = _('%s has not emitted any errors.').format(extension.uuid);
errorDisplay.add(new St.Label({ text: message }));
}
actor._errorDisplay = errorDisplay;
actor._parentBox.add(errorDisplay);
- actor.label = _("Hide Errors");
+ actor.label = _('Hide Errors');
} else {
actor._errorDisplay.destroy();
actor._errorDisplay = null;
- actor.label = _("Show Errors");
+ actor.label = _('Show Errors');
}
actor._isShowing = shouldShow;
LoginManager.registerSessionWithGDM();
if (perfModule) {
- let perfOutput = GLib.getenv("SHELL_PERF_OUTPUT");
+ let perfOutput = GLib.getenv('SHELL_PERF_OUTPUT');
Scripting.runPerfScript(perfModule, perfOutput);
}
});
moveMessage(message, index, animate) {
if (!this._messages.includes(message))
- throw new Error(`Impossible to move untracked message`);
+ throw new Error('Impossible to move untracked message');
let listItem = message.get_parent();
const messages = this._messages;
if (!messages.includes(message))
- throw new Error(`Impossible to remove untracked message`);
+ throw new Error('Impossible to remove untracked message');
let listItem = message.get_parent();
listItem._connectionsIds.forEach(id => message.disconnect(id));
export const SystemNotificationSource = GObject.registerClass(
class SystemNotificationSource extends Source {
_init() {
- super._init(_("System Information"), 'dialog-information-symbolic');
+ super._init(_('System Information'), 'dialog-information-symbolic');
}
open() {
this._busName}; expected an array of strings, got ${
this._trackArtists} (${typeof this._trackArtists})`);
}
- this._trackArtists = [_("Unknown artist")];
+ this._trackArtists = [_('Unknown artist')];
}
this._trackTitle = metadata['xesam:title'];
this._busName}; expected a string, got ${
this._trackTitle} (${typeof this._trackTitle})`);
}
- this._trackTitle = _("Unknown title");
+ this._trackTitle = _('Unknown title');
}
this._trackCoverUrl = metadata['mpris:artUrl'];
name: 'overview',
/* Translators: This is the main view to select
activities. See also note for "Activities" string. */
- accessible_name: _("Overview"),
+ accessible_name: _('Overview'),
vertical: true,
});
import {loadInterfaceXML} from '../misc/fileUtils.js';
-const ACTIVE_COLOR = "#729fcf";
+const ACTIVE_COLOR = '#729fcf';
const LTR = 0;
const RTL = 1;
let title;
if (this._editionMode) {
- title = _("Press a button to configure");
- this._tipLabel.set_text(_("Press Esc to exit"));
+ title = _('Press a button to configure');
+ this._tipLabel.set_text(_('Press Esc to exit'));
} else {
title = this.padDevice.get_device_name();
- this._tipLabel.set_text(_("Press any key to exit"));
+ this._tipLabel.set_text(_('Press any key to exit'));
}
this._titleLabel.set_text(title);
if (padDevice == null) {
invocation.return_error_literal(Gio.IOErrorEnum,
Gio.IOErrorEnum.CANCELLED,
- "Invalid params");
+ 'Invalid params');
return;
}
let bin = new St.Bin({ name: 'appMenu' });
this.add_actor(bin);
- this.bind_property("reactive", this, "can-focus", 0);
+ this.bind_property('reactive', this, 'can-focus', 0);
this.reactive = false;
this._container = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
});
Main.layoutManager.panelBox.add(this);
- Main.ctrlAltTabManager.addGroup(this, _("Top Bar"), 'focus-top-bar-symbolic',
+ Main.ctrlAltTabManager.addGroup(this, _('Top Bar'), 'focus-top-bar-symbolic',
{ sortGroup: CtrlAltTab.SortGroup.TOP });
Main.sessionMode.connect('updated', this._updatePanel.bind(this));
} else if (menuItem instanceof PopupBaseMenuItem) {
this._connectItemSignals(menuItem);
} else {
- throw TypeError("Invalid argument to PopupMenuBase.addMenuItem()");
+ throw TypeError('Invalid argument to PopupMenuBase.addMenuItem()');
}
menuItem._setParent(this);
if (!this._checkArea(x, y, width, height)) {
invocation.return_error_literal(Gio.IOErrorEnum,
Gio.IOErrorEnum.CANCELLED,
- "Invalid params");
+ 'Invalid params');
return;
}
let screenshot = await this._createScreenshot(invocation);
if (!this._checkArea(x, y, width, height)) {
invocation.return_error_literal(Gio.IOErrorEnum,
Gio.IOErrorEnum.CANCELLED,
- "Invalid params");
+ 'Invalid params');
return;
}
let flashspot = new Flashspot({ x, y, width, height });
export function defineScriptEvent(name, description) {
Shell.PerfLog.get_default().define_event(`script.${name}`,
description,
- "");
+ '');
}
/**
Gio.FileCreateFlags.NONE,
null);
let out = Gio.BufferedOutputStream.new_sized(raw, 4096);
- Shell.write_string_to_stream(out, "{\n");
+ Shell.write_string_to_stream(out, '{\n');
Shell.write_string_to_stream(out, '"events":\n');
Shell.PerfLog.get_default().dump_events(out);
if (!haveResults) {
if (this.searchInProgress)
- this._statusText.set_text(_("Searching…"));
+ this._statusText.set_text(_('Searching…'));
else
- this._statusText.set_text(_("No results."));
+ this._statusText.set_text(_('No results.'));
}
}
}
setMoreCount(count) {
- this._moreLabel.text = ngettext("%d more", "%d more", count).format(count);
+ this._moreLabel.text = ngettext('%d more', '%d more', count).format(count);
this._moreLabel.visible = count > 0;
}
});
popMode(mode) {
if (this.currentMode != mode || this._modeStack.length === 1)
- throw new Error("Invalid SessionMode.popMode");
+ throw new Error('Invalid SessionMode.popMode');
console.debug(`sessionMode: Popping mode ${mode}`);
this._modeStack.pop();
// Populate menu
let item;
- item = new PopupMenu.PopupMenuItem(_("Copy"));
+ item = new PopupMenu.PopupMenuItem(_('Copy'));
item.connect('activate', this._onCopyActivated.bind(this));
this.addMenuItem(item);
this._copyItem = item;
- item = new PopupMenu.PopupMenuItem(_("Paste"));
+ item = new PopupMenu.PopupMenuItem(_('Paste'));
item.connect('activate', this._onPasteActivated.bind(this));
this.addMenuItem(item);
this._pasteItem = item;
_updatePasswordItem() {
if (!this._entry.password_visible)
- this._passwordItem.label.set_text(_("Show Text"));
+ this._passwordItem.label.set_text(_('Show Text'));
else
- this._passwordItem.label.set_text(_("Hide Text"));
+ this._passwordItem.label.set_text(_('Hide Text'));
}
_onCopyActivated() {
export const ATIndicator = GObject.registerClass(
class ATIndicator extends PanelMenu.Button {
_init() {
- super._init(0.5, _("Accessibility"));
+ super._init(0.5, _('Accessibility'));
this.add_child(new St.Icon({
style_class: 'system-status-icon',
let highContrast = this._buildItem(_('High Contrast'), A11Y_INTERFACE_SCHEMA, KEY_HIGH_CONTRAST);
this.menu.addMenuItem(highContrast);
- let magnifier = this._buildItem(_("Zoom"), APPLICATIONS_SCHEMA,
+ let magnifier = this._buildItem(_('Zoom'), APPLICATIONS_SCHEMA,
'screen-magnifier-enabled');
this.menu.addMenuItem(magnifier);
let textZoom = this._buildFontItem();
this.menu.addMenuItem(textZoom);
- let screenReader = this._buildItem(_("Screen Reader"), APPLICATIONS_SCHEMA,
+ let screenReader = this._buildItem(_('Screen Reader'), APPLICATIONS_SCHEMA,
'screen-reader-enabled');
this.menu.addMenuItem(screenReader);
- let screenKeyboard = this._buildItem(_("Screen Keyboard"), APPLICATIONS_SCHEMA,
+ let screenKeyboard = this._buildItem(_('Screen Keyboard'), APPLICATIONS_SCHEMA,
'screen-keyboard-enabled');
this.menu.addMenuItem(screenKeyboard);
- let visualBell = this._buildItem(_("Visual Alerts"), WM_SCHEMA, KEY_VISUAL_BELL);
+ let visualBell = this._buildItem(_('Visual Alerts'), WM_SCHEMA, KEY_VISUAL_BELL);
this.menu.addMenuItem(visualBell);
- let stickyKeys = this._buildItem(_("Sticky Keys"), A11Y_KEYBOARD_SCHEMA, KEY_STICKY_KEYS_ENABLED);
+ let stickyKeys = this._buildItem(_('Sticky Keys'), A11Y_KEYBOARD_SCHEMA, KEY_STICKY_KEYS_ENABLED);
this.menu.addMenuItem(stickyKeys);
- let slowKeys = this._buildItem(_("Slow Keys"), A11Y_KEYBOARD_SCHEMA, KEY_SLOW_KEYS_ENABLED);
+ let slowKeys = this._buildItem(_('Slow Keys'), A11Y_KEYBOARD_SCHEMA, KEY_SLOW_KEYS_ENABLED);
this.menu.addMenuItem(slowKeys);
- let bounceKeys = this._buildItem(_("Bounce Keys"), A11Y_KEYBOARD_SCHEMA, KEY_BOUNCE_KEYS_ENABLED);
+ let bounceKeys = this._buildItem(_('Bounce Keys'), A11Y_KEYBOARD_SCHEMA, KEY_BOUNCE_KEYS_ENABLED);
this.menu.addMenuItem(bounceKeys);
let mouseKeys = this._buildItem(_('Mouse Keys'), A11Y_KEYBOARD_SCHEMA, KEY_MOUSE_KEYS_ENABLED);
let settings = new Gio.Settings({ schema_id: DESKTOP_INTERFACE_SCHEMA });
let factor = settings.get_double(KEY_TEXT_SCALING_FACTOR);
let initialSetting = factor > 1.0;
- let widget = this._buildItemExtended(_("Large Text"),
+ let widget = this._buildItemExtended(_('Large Text'),
initialSetting,
settings.is_writable(KEY_TEXT_SCALING_FACTOR),
enabled => {
const DWELL_MODE_WINDOW = 'window';
const DWELL_CLICK_MODES = {
primary: {
- name: _("Single Click"),
+ name: _('Single Click'),
icon: 'pointer-primary-click-symbolic',
type: Clutter.PointerA11yDwellClickType.PRIMARY,
},
double: {
- name: _("Double Click"),
+ name: _('Double Click'),
icon: 'pointer-double-click-symbolic',
type: Clutter.PointerA11yDwellClickType.DOUBLE,
},
drag: {
- name: _("Drag"),
+ name: _('Drag'),
icon: 'pointer-drag-symbolic',
type: Clutter.PointerA11yDwellClickType.DRAG,
},
secondary: {
- name: _("Secondary Click"),
+ name: _('Secondary Click'),
icon: 'pointer-secondary-click-symbolic',
type: Clutter.PointerA11yDwellClickType.SECONDARY,
},
export const DwellClickIndicator = GObject.registerClass(
class DwellClickIndicator extends PanelMenu.Button {
_init() {
- super._init(0.5, _("Dwell Click"));
+ super._init(0.5, _('Dwell Click'));
this._icon = new St.Icon({
style_class: 'system-status-icon',
this._mruSourcesBackup = null;
this._keybindingAction =
Main.wm.addKeybinding('switch-input-source',
- new Gio.Settings({ schema_id: "org.gnome.desktop.wm.keybindings" }),
+ new Gio.Settings({ schema_id: 'org.gnome.desktop.wm.keybindings' }),
Meta.KeyBindingFlags.NONE,
Shell.ActionMode.ALL,
this._switchInputSource.bind(this));
this._keybindingActionBackward =
Main.wm.addKeybinding('switch-input-source-backward',
- new Gio.Settings({ schema_id: "org.gnome.desktop.wm.keybindings" }),
+ new Gio.Settings({ schema_id: 'org.gnome.desktop.wm.keybindings' }),
Meta.KeyBindingFlags.IS_REVERSED,
Shell.ActionMode.ALL,
this._switchInputSource.bind(this));
export const InputSourceIndicator = GObject.registerClass(
class InputSourceIndicator extends PanelMenu.Button {
_init() {
- super._init(0.5, _("Keyboard"));
+ super._init(0.5, _('Keyboard'));
this.connect('destroy', this._onDestroy.bind(this));
this._propSection.actor.hide();
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
- this._showLayoutItem = this.menu.addAction(_("Show Keyboard Layout"), this._showLayout.bind(this));
+ this._showLayoutItem = this.menu.addAction(_('Show Keyboard Layout'), this._showLayout.bind(this));
this.menu.addSettingsAction(_('Keyboard Settings'),
'gnome-keyboard-panel.desktop');
_userAuthorizeApp() {
let name = this._app.get_name();
let appInfo = this._app.get_app_info();
- let reason = appInfo.get_locale_string("X-Geoclue-Reason");
+ let reason = appInfo.get_locale_string('X-Geoclue-Reason');
this._dialog =
new GeolocationDialog(name, reason, this.reqAccuracyLevel);
function ssidToLabel(ssid) {
let label = NM.utils_ssid_to_utf8(ssid.get_data());
if (!label)
- label = _("<unknown>");
+ label = _('<unknown>');
return label;
}
_ensureSource() {
if (!this._source) {
- this._source = new MessageTray.Source(_("Thunderbolt"),
+ this._source = new MessageTray.Source(_('Thunderbolt'),
'thunderbolt-symbolic');
this._source.connect('destroy', () => (this._source = null));
return; /* we are done */
if (!unlocked) {
- const title = _("Unknown Thunderbolt device");
- const body = _("New device has been detected while you were away. Please disconnect and reconnect the device to start using it.");
+ const title = _('Unknown Thunderbolt device');
+ const body = _('New device has been detected while you were away. Please disconnect and reconnect the device to start using it.');
this._notify(title, body);
} else {
- const title = _("Unauthorized Thunderbolt device");
- const body = _("New device has been detected and needs to be authorized by an administrator.");
+ const title = _('Unauthorized Thunderbolt device');
+ const body = _('New device has been detected and needs to be authorized by an administrator.');
this._notify(title, body);
}
}
_onEnrollFailed(obj, device, error) {
- const title = _("Thunderbolt authorization error");
- const body = _("Could not authorize the Thunderbolt device: %s").format(error.message);
+ const title = _('Thunderbolt authorization error');
+ const body = _('Could not authorize the Thunderbolt device: %s').format(error.message);
this._notify(title, body);
}
});
_getTitleAndBanner(app, window) {
let title = app.get_name();
- let banner = _("“%s” is ready").format(window.get_title());
+ let banner = _('“%s” is ready').format(window.get_title());
return [title, banner];
}
const GsdWacomIface = loadInterfaceXML('org.gnome.SettingsDaemon.Wacom');
const GsdWacomProxy = Gio.DBusProxy.makeProxyWrapper(GsdWacomIface);
-const WINDOW_DIMMER_EFFECT_NAME = "gnome-shell-window-dimmer";
+const WINDOW_DIMMER_EFFECT_NAME = 'gnome-shell-window-dimmer';
Gio._promisify(Shell, 'util_start_systemd_unit');
Gio._promisify(Shell, 'util_stop_systemd_unit');
set(rect, displayW, displayH) {
/* Translators: This represents the size of a window. The first number is
* the width of the window and the second is the height. */
- let text = _("%d × %d").format(displayW, displayH);
+ let text = _('%d × %d').format(displayW, displayH);
this._label.set_text(text);
this.set_position(rect.x, rect.y);
window.unmaximize(Meta.MaximizeFlags.BOTH);
});
} else {
- item = this.addAction(_("Maximize"), () => {
+ item = this.addAction(_('Maximize'), () => {
window.maximize(Meta.MaximizeFlags.BOTH);
});
}
item.setSensitive(false);
if (!window.titlebar_is_onscreen() && type != Meta.WindowType.DOCK && type != Meta.WindowType.DESKTOP) {
- this.addAction(_("Move Titlebar Onscreen"), () => {
+ this.addAction(_('Move Titlebar Onscreen'), () => {
window.shove_titlebar_onscreen();
});
}
- item = this.addAction(_("Always on Top"), () => {
+ item = this.addAction(_('Always on Top'), () => {
if (window.is_above())
window.unmake_above();
else
window.is_on_primary_monitor())) {
let isSticky = window.is_on_all_workspaces();
- item = this.addAction(_("Always on Visible Workspace"), () => {
+ item = this.addAction(_('Always on Visible Workspace'), () => {
if (isSticky)
window.unstick();
else
if (!isSticky) {
let workspace = window.get_workspace();
if (workspace != workspace.get_neighbor(Meta.MotionDirection.LEFT)) {
- this.addAction(_("Move to Workspace Left"), () => {
+ this.addAction(_('Move to Workspace Left'), () => {
let dir = Meta.MotionDirection.LEFT;
window.change_workspace(workspace.get_neighbor(dir));
});
}
if (workspace != workspace.get_neighbor(Meta.MotionDirection.RIGHT)) {
- this.addAction(_("Move to Workspace Right"), () => {
+ this.addAction(_('Move to Workspace Right'), () => {
let dir = Meta.MotionDirection.RIGHT;
window.change_workspace(workspace.get_neighbor(dir));
});
}
if (workspace != workspace.get_neighbor(Meta.MotionDirection.UP)) {
- this.addAction(_("Move to Workspace Up"), () => {
+ this.addAction(_('Move to Workspace Up'), () => {
let dir = Meta.MotionDirection.UP;
window.change_workspace(workspace.get_neighbor(dir));
});
}
if (workspace != workspace.get_neighbor(Meta.MotionDirection.DOWN)) {
- this.addAction(_("Move to Workspace Down"), () => {
+ this.addAction(_('Move to Workspace Down'), () => {
let dir = Meta.MotionDirection.DOWN;
window.change_workspace(workspace.get_neighbor(dir));
});
let upMonitorIndex =
display.get_monitor_neighbor_index(monitorIndex, dir);
if (upMonitorIndex != -1) {
- this.addAction(_("Move to Monitor Up"), () => {
+ this.addAction(_('Move to Monitor Up'), () => {
window.move_to_monitor(upMonitorIndex);
});
}
let downMonitorIndex =
display.get_monitor_neighbor_index(monitorIndex, dir);
if (downMonitorIndex != -1) {
- this.addAction(_("Move to Monitor Down"), () => {
+ this.addAction(_('Move to Monitor Down'), () => {
window.move_to_monitor(downMonitorIndex);
});
}
let leftMonitorIndex =
display.get_monitor_neighbor_index(monitorIndex, dir);
if (leftMonitorIndex != -1) {
- this.addAction(_("Move to Monitor Left"), () => {
+ this.addAction(_('Move to Monitor Left'), () => {
window.move_to_monitor(leftMonitorIndex);
});
}
let rightMonitorIndex =
display.get_monitor_neighbor_index(monitorIndex, dir);
if (rightMonitorIndex != -1) {
- this.addAction(_("Move to Monitor Right"), () => {
+ this.addAction(_('Move to Monitor Right'), () => {
window.move_to_monitor(rightMonitorIndex);
});
}
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
- item = this.addAction(_("Close"), event => {
+ item = this.addAction(_('Close'), event => {
window.delete(event.get_time());
});
if (!window.can_close())
object-curly-spacing:
- error
- always
- quotes: off